<template>
    <div class="sidebar">
        <el-menu default-active="index" class="el-menu-vertical-demo" menu-trigger="click" router :collapse="isCollapse">
            <el-menu-item index="index">
                <i class="el-icon-share"></i>
                <span slot="title">首页</span>
            </el-menu-item>
            <el-submenu index="note">
                <template slot="title">
                    <i class="el-icon-edit"></i>
                    <span slot="title">笔记</span>
                </template>
                <el-menu-item index="note_note">
                    <i class="el-icon-setting"></i>
                    <span slot="title">笔记管理</span>
                </el-menu-item>
                <el-menu-item index="note_category">
                    <i class="el-icon-setting"></i>
                    <span slot="title">目录管理</span>
                </el-menu-item>
                <el-menu-item index="note_tag">
                    <i class="el-icon-setting"></i>
                    <span slot="title">标签管理</span>
                </el-menu-item>
            </el-submenu>
            <el-menu-item index="3">
                <i class="el-icon-more"></i>
                <span slot="title">智能家居</span>
            </el-menu-item>
            <el-menu-item index="4">
                <i class="el-icon-document "></i>
                <span slot="title">消息中心</span>
            </el-menu-item>
            <el-submenu index="setting">
                <template slot="title">
                    <i class="el-icon-message"></i>
                    <span slot="title">系统设置</span>
                </template>
                <el-menu-item index="5-1">
                    <i class="el-icon-setting"></i>
                    <span slot="title">个人设置</span>
                </el-menu-item>
                <el-menu-item index="5-2">
                    <i class="el-icon-setting"></i>
                    <span slot="title">笔记设置</span>
                </el-menu-item>
                <el-menu-item index="5-3">
                    <i class="el-icon-setting"></i>
                    <span slot="title">智能设置</span>
                </el-menu-item>
            </el-submenu>
        </el-menu>
    </div>
</template>

<style>
.el-menu-vertical-demo:not(.el-menu--collapse) {
  display: block;
  position: absolute;
  width: 200px;
  left: 0;
  top: 70px;
  bottom: 0;
}

.el-menu--collapse {
  display: block;
  position: absolute;
  left: 0;
  top: 70px;
  width: 60px;
  bottom: 0;
}
</style>

<script>
export default {
  data() {
    return {
      isCollapse: false
    };
  },
  methods: {
    
  }
};
</script>